package com.atao.baokede.mapper;

import com.atao.baokede.pojo.AiDialogue;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.ai.chat.model.ChatResponse;

import java.util.List;

@Mapper
public interface AiMapper {

    // 清空所有会话
    @Delete("delete from ai_dialogue where user_id = #{userId} ")
    void deleteAllChat(Long userId);

    // 获取所有会话
    @Select("select * from ai_dialogue where user_id = #{userId} ")
    List<AiDialogue> getAllChat(Long userId);
}
